package com.shure.desensitize.serialize;

/**
 * @ClassName ContextUtil
 * @Description TODO
 * @Author shure
 * @Date 2023/10/27 11:48
 * @Version 1.0
 **/
public class DesensitizeTransfer {

    private static final ThreadLocal<Boolean> cache = new ThreadLocal<>();


    public DesensitizeTransfer() {
    }

    public static void skipSensitive() {
        cache.set(true);
    }

    public static boolean getValue() {
        return cache.get() != null && cache.get();
    }

    public static void removeValue() {
        cache.remove();
    }


}
